using System;
using System.Web;
using OpenWaves.ActivityFeed.Web.Handler;

namespace OpenWaves.ActivityFeed.UnitTests.Web
{
    public static class BrowserExtensions
    {
        public static HttpResponseBase MakeRequest(this Browser browser, string verb, string route)
        {
            switch (verb)
            {
                case "GET":
                    return browser.Get(route);
                case "POST":
                    return browser.PostJson(route, new object());
                case "DELETE":
                    return browser.Delete(route);
                default:
                    throw new ArgumentException();
            }            
        }
    }
}